package com.guigu.service.impl;

import com.guigu.mapper.TMemberStatisticsMapper;
import com.guigu.mapper.TUserMapper;
import com.guigu.pojo.TMemberStatistics;
import com.guigu.pojo.TUser;
import com.guigu.service.TuserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;

@Service
public class TuserServiceImpl implements TuserService {

    @Resource
    private TUserMapper tUserMapper;

    @Resource
    private TMemberStatisticsMapper tMemberStatisticsMapper;
    //    登录
    @Override
    public TUser login(TUser tUser) {
          TUser tUser1=this.tUserMapper.login(tUser.getUsername());
        if (tUser1 !=null){
            if (tUser1.getPassword().equals(tUser.getPassword())){
                return  tUser1;
            }
        }

        return null;
    }
}
